package com.xintonghua.bussiness.base;

import android.os.Bundle;

import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.xintonghua.bussiness.api.HttpCent;
import com.xintonghua.bussiness.api.myinterface.DataCallBack;

import org.greenrobot.eventbus.EventBus;

/**
 * 作者：wanxianyi
 * 时间：2018/3/8.
 * 包名：com.xintonghua.bussiness.base
 */

public class BaseActivity extends com.xintonghua.base.ui.BaseActivity implements DataCallBack,XRecyclerView.LoadingListener {
    public HttpCent httpCent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        httpCent = HttpCent.getInstance(this);
    }

    @Override
    public void solve(String result) {

    }

    @Override
    public void dataBack(Object data, int order) {

    }

    @Override
    public void errorBack(String error, int order) {

    }

    @Override
    public void finishBack() {

    }

    @Override
    public void onRefresh() {

    }

    @Override
    public void onLoadMore() {

    }
    public UMShareListener shareListener = new UMShareListener() {
        /**
         * @descrption 分享开始的回调
         * @param platform 平台类型
         */
        @Override
        public void onStart(SHARE_MEDIA platform) {

        }

        /**
         * @descrption 分享成功的回调
         * @param platform 平台类型
         */
        @Override
        public void onResult(SHARE_MEDIA platform) {
            mToast("成功了");
        }

        /**
         * @descrption 分享失败的回调
         * @param platform 平台类型
         * @param t 错误原因
         */
        @Override
        public void onError(SHARE_MEDIA platform, Throwable t) {
            mToast("失败");
        }

        /**
         * @descrption 分享取消的回调
         * @param platform 平台类型
         */
        @Override
        public void onCancel(SHARE_MEDIA platform) {
            mToast("取消了");

        }
    };
}
